<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>后台管理系统</title>
  <link rel="stylesheet" href="layui/css/layui.css">
  <link rel="stylesheet" href="font/iconfont.css">
  <link rel="stylesheet" href="css/public.css">
  <script>
    var token = sessionStorage.getItem('token');
      if (!token) {
        window.location.href = 'userLogin'
      }
  </script>
</head>
<body class="layui-layout-body">
  <div class="layui-layout layui-layout-admin">
    <div class="layui-header">
      <div class="layui-logo">项目管理系统</div>
      <!-- 头部区域（可配合layui已有的水平导航） -->
      <ul class="layui-nav layui-layout-right">
        <!-- <li class="layui-nav-item">
          <a href="javascript:;">
            <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
            贤心
          </a>
          <dl class="layui-nav-child">
            <dd><a href="">基本资料</a></dd>
            <dd><a href="">安全设置</a></dd>
          </dl>
        </li> -->
        <li class="layui-nav-item"><a href=""><img src="iconImg/admin-line.png" alt="">admin</a></li>
        <li class="layui-nav-item"><a href=""><img src="iconImg/home.png" alt="">领导驾驶舱</a></li>
        <li class="layui-nav-item"><a href=""><img src="iconImg/password.png" alt="">修改密码</a></li>
        <li class="layui-nav-item"><a href="login.html"><img src="iconImg/logout.png" alt="">退出</a></li>
      </ul>
    </div>

    <div class="layui-side layui-bg-black">
      <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-filter="test" lay-shrink="all">
          <li class="layui-nav-item">
            <a class="" href="javascript:;"><img src="iconImg/menu.png" alt=""><span>学院-校领导</span></a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;" data-url="college/recruitStudents">校情总览</a></dd>
              <dd class="layui-this"><a href="javascript:;" data-url="college/index">基本信息</a></dd>
              <dd><a href="javascript:;" data-url="college/index">师资队伍</a></dd>
              <dd><a href="javascript:;" data-url="student/index">学生信息</a></dd>
              <dd><a href="javascript:;" data-url="college/teacheWork">教学工作</a></dd>
              <dd><a href="javascript:;">就业情况</a></dd>
              <dd><a href="javascript:;">校企合作</a></dd>
              <dd><a href="javascript:;">科研工作</a></dd>
              <dd><a href="javascript:;">学生工作</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item">
            <a class="" href="javascript:;"><img src="iconImg/menu.png" alt="">专业-校领导</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;" data-url="major/index">专业概况</a></dd>
              <dd><a href="javascript:;">招商情况</a></dd>
              <dd><a href="javascript:;">师资详情</a></dd>
              <dd><a href="javascript:;">教学资源</a></dd>
              <dd><a href="javascript:;">实训条件</a></dd>
              <dd><a href="javascript:;">校企合作</a></dd>
              <dd><a href="javascript:;">教学质量</a></dd>
              <dd><a href="javascript:;">就业情况</a></dd>
              <dd><a href="javascript:;">科研及社会服务</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item">
            <a class="" href="javascript:;"><img src="iconImg/menu.png" alt="">师资-校领导</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;">师资概况</a></dd>
              <dd><a href="javascript:;">教师成长</a></dd>
              <dd><a href="javascript:;" data-url="teachers/index">教学概况</a></dd>
              <dd><a href="javascript:;">科研概况</a></dd>
              <dd><a href="javascript:;">学生管理</a></dd>
              <dd><a href="javascript:;">教师考核</a></dd>
              <dd><a href="javascript:;">教师获奖</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item">
            <a class="" href="javascript:;"><img src="iconImg/menu.png" alt="">课程-校领导</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;" data-url="course/index">基本信息</a></dd>
              <dd><a href="javascript:;">课程开发</a></dd>
              <dd><a href="javascript:;">课程资源</a></dd>
              <dd><a href="javascript:;">教学实施</a></dd>
              <dd><a href="javascript:;">实训管理</a></dd>
              <dd><a href="javascript:;" data-url="course/courseFeedback">课程反馈</a></dd>
              <dd><a href="javascript:;">课程成果</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item">
            <a class="" href="javascript:;"><img src="iconImg/menu.png" alt="">学生-校领导</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;">基本信息</a></dd>
              <dd><a href="javascript:;">综合素质</a></dd>
              <dd><a href="javascript:;">学业发展</a></dd>
              <dd><a href="javascript:;">生活习惯</a></dd>
              <dd><a href="javascript:;">行为习惯</a></dd>
              <dd><a href="javascript:;">职业发展</a></dd>
              <dd><a href="javascript:;">建档立卡</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item">
            <a class="" href="javascript:;"><img src="iconImg/menu.png" alt="">数据中心</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;" data-url="studentBasicData">最基础数据</a></dd>
              <dd><a href="javascript:;" data-url="studentCompleteData/studentCompleteDataHtml">学生基本信息</a></dd>
              <dd><a href="javascript:;" data-url="teacherData/teacherBasicData">教职工基础数据</a></dd>
              <dd><a href="javascript:;" data-url="/dataCenter/otherTeacherData">教师其他信息数据</a></dd>
            </dl>
          </li>
        </ul>
      </div>
    </div>

    <div class="layui-body" style="font-size: 0;">
      <!-- 内容主体区域 -->
      <!-- <div style="padding: 15px;">内容主体区域</div>
       -->
       <iframe src="college/index" frameborder="0" id="demoAdmin" style="width: 100%; height: 100%;"></iframe>
    </div>

    <div class="layui-footer">
      <!-- 底部固定区域 -->
      © 2020 - 项目管理
    </div>
  </div>
  <script src="layui/layui.all.js"></script>
  <script>
    //JavaScript代码区域
    layui.use('element', function () {
      var element = layui.element;
      var $ = layui.jquery;
      var url = sessionStorage.getItem('url');
      if (url) {
        $('#demoAdmin').attr('src', url)
        // 刷新页面获取导航栏展开
        var linkArray = $('.layui-nav-child a');
        linkArray.filter((index, item) => {
          var dataUrl = $(item).data('url');
          $(item).parent('dd').removeClass('layui-this');
          // $(item).parent('dd').parent('dl').parent('li').removeClass('layui-nav-itemed');
          if(url === dataUrl) {
            $(item).parent('dd').addClass('layui-this');
            $(item).parent('dd').parent('dl').parent('li').addClass('layui-nav-itemed');
          }
        })
      }  

      $('.layui-nav-item dl a').on('click', function() {
        var url = $(this).data('url');
        if (url) {
          sessionStorage.setItem('url', url)
          $('#demoAdmin').attr('src', url)
        }
      })
    });
  </script>
</body>

</html>